3.2.98 \(\int (a+b \tanh ^{-1}(c \sqrt {x}))^2 \, dx\) [198]

Optimal. Leaf size=85 \[ \frac {2 a b \sqrt {x}}{c}+\frac {2 b^2 \sqrt {x} \tanh ^{-1}\left (c \sqrt {x}\right )}{c}-\frac {\left (a+b \tanh ^{-1}\left (c \sqrt {x}\right )\right )^2}{c^2}+x \left (a+b \tanh ^{-1}\left (c \sqrt {x}\right )\right )^2+\frac {b^2 \log \left (1-c^2 x\right )}{c^2} \]

[Out]

-(a+b*arctanh(c*x^(1/2)))^2/c^2+x*(a+b*arctanh(c*x^(1/2)))^2+b^2*ln(-c^2*x+1)/c^2+2*a*b*x^(1/2)/c+2*b^2*arctan
h(c*x^(1/2))*x^(1/2)/c

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {6027, 6037, 6127, 6021, 266, 6095} \begin {gather*} -\frac {\left (a+b \tanh ^{-1}\left (c \sqrt {x}\right )\right )^2}{c^2}+\frac {2 a b \sqrt {x}}{c}+x \left (a+b \tanh ^{-1}\left (c \sqrt {x}\right )\right )^2+\frac {b^2 \log \left (1-c^2 x\right )}{c^2}+\frac {2 b^2 \sqrt {x} \tanh ^{-1}\left (c \sqrt {x}\right )}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c*Sqrt[x]])^2,x]

[Out]

(2*a*b*Sqrt[x])/c + (2*b^2*Sqrt[x]*ArcTanh[c*Sqrt[x]])/c - (a + b*ArcTanh[c*Sqrt[x]])^2/c^2 + x*(a + b*ArcTanh
[c*Sqrt[x]])^2 + (b^2*Log[1 - c^2*x])/c^2

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 6021

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x^n])^p, x] - Dist[b
*c*n*p, Int[x^n*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p
, 0] && (EqQ[n, 1] || EqQ[p, 1])

Rule 6027

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_)]*(b_.))^(p_), x_Symbol] :> With[{k = Denominator[n]}, Dist[k, Subst[Int[x
^(k - 1)*(a + b*ArcTanh[c*x^(k*n)])^p, x], x, x^(1/k)], x]] /; FreeQ[{a, b, c}, x] && IGtQ[p, 1] && FractionQ[
n]

Rule 6037

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTanh[c*
x^n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))
), x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1
]

Rule 6095

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p
 + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]

Rule 6127

Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[f^2
/e, Int[(f*x)^(m - 2)*(a + b*ArcTanh[c*x])^p, x], x] - Dist[d*(f^2/e), Int[(f*x)^(m - 2)*((a + b*ArcTanh[c*x])
^p/(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 1]

Rubi steps

\begin {align*} \int \left (a+b \tanh ^{-1}\left (c \sqrt {x}\right )\right )^2 \, dx &=\int \left (a+b \tanh ^{-1}\left (c \sqrt {x}\right )\right )^2 \, dx\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 115, normalized size = 1.35 \begin {gather*} \frac {2 a b c \sqrt {x}+a^2 c^2 x+2 b c \left (b+a c \sqrt {x}\right ) \sqrt {x} \tanh ^{-1}\left (c \sqrt {x}\right )+b^2 \left (-1+c^2 x\right ) \tanh ^{-1}\left (c \sqrt {x}\right )^2+b (a+b) \log \left (1-c \sqrt {x}\right )-a b \log \left (1+c \sqrt {x}\right )+b^2 \log \left (1+c \sqrt {x}\right )}{c^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTanh[c*Sqrt[x]])^2,x]

[Out]

(2*a*b*c*Sqrt[x] + a^2*c^2*x + 2*b*c*(b + a*c*Sqrt[x])*Sqrt[x]*ArcTanh[c*Sqrt[x]] + b^2*(-1 + c^2*x)*ArcTanh[c
*Sqrt[x]]^2 + b*(a + b)*Log[1 - c*Sqrt[x]] - a*b*Log[1 + c*Sqrt[x]] + b^2*Log[1 + c*Sqrt[x]])/c^2

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(251\) vs. \(2(75)=150\).
time = 0.17, size = 252, normalized size = 2.96

method result size
derivativedivides \(\frac {a^{2} x \,c^{2}+b^{2} c^{2} x \arctanh \left (c \sqrt {x}\right )^{2}+2 b^{2} \arctanh \left (c \sqrt {x}\right ) c \sqrt {x}+b^{2} \arctanh \left (c \sqrt {x}\right ) \ln \left (c \sqrt {x}-1\right )-b^{2} \arctanh \left (c \sqrt {x}\right ) \ln \left (1+c \sqrt {x}\right )+\frac {b^{2} \ln \left (c \sqrt {x}-1\right )^{2}}{4}-\frac {b^{2} \ln \left (c \sqrt {x}-1\right ) \ln \left (\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )}{2}+b^{2} \ln \left (c \sqrt {x}-1\right )+b^{2} \ln \left (1+c \sqrt {x}\right )+\frac {b^{2} \ln \left (1+c \sqrt {x}\right )^{2}}{4}-\frac {b^{2} \ln \left (-\frac {c \sqrt {x}}{2}+\frac {1}{2}\right ) \ln \left (1+c \sqrt {x}\right )}{2}+\frac {b^{2} \ln \left (-\frac {c \sqrt {x}}{2}+\frac {1}{2}\right ) \ln \left (\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )}{2}+2 a b \,c^{2} x \arctanh \left (c \sqrt {x}\right )+2 a b c \sqrt {x}+a b \ln \left (c \sqrt {x}-1\right )-a b \ln \left (1+c \sqrt {x}\right )}{c^{2}}\) \(252\)
default \(\frac {a^{2} x \,c^{2}+b^{2} c^{2} x \arctanh \left (c \sqrt {x}\right )^{2}+2 b^{2} \arctanh \left (c \sqrt {x}\right ) c \sqrt {x}+b^{2} \arctanh \left (c \sqrt {x}\right ) \ln \left (c \sqrt {x}-1\right )-b^{2} \arctanh \left (c \sqrt {x}\right ) \ln \left (1+c \sqrt {x}\right )+\frac {b^{2} \ln \left (c \sqrt {x}-1\right )^{2}}{4}-\frac {b^{2} \ln \left (c \sqrt {x}-1\right ) \ln \left (\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )}{2}+b^{2} \ln \left (c \sqrt {x}-1\right )+b^{2} \ln \left (1+c \sqrt {x}\right )+\frac {b^{2} \ln \left (1+c \sqrt {x}\right )^{2}}{4}-\frac {b^{2} \ln \left (-\frac {c \sqrt {x}}{2}+\frac {1}{2}\right ) \ln \left (1+c \sqrt {x}\right )}{2}+\frac {b^{2} \ln \left (-\frac {c \sqrt {x}}{2}+\frac {1}{2}\right ) \ln \left (\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )}{2}+2 a b \,c^{2} x \arctanh \left (c \sqrt {x}\right )+2 a b c \sqrt {x}+a b \ln \left (c \sqrt {x}-1\right )-a b \ln \left (1+c \sqrt {x}\right )}{c^{2}}\) \(252\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c*x^(1/2)))^2,x,method=_RETURNVERBOSE)

[Out]

2/c^2*(1/2*a^2*x*c^2+1/2*b^2*c^2*x*arctanh(c*x^(1/2))^2+b^2*arctanh(c*x^(1/2))*c*x^(1/2)+1/2*b^2*arctanh(c*x^(
1/2))*ln(c*x^(1/2)-1)-1/2*b^2*arctanh(c*x^(1/2))*ln(1+c*x^(1/2))+1/8*b^2*ln(c*x^(1/2)-1)^2-1/4*b^2*ln(c*x^(1/2
)-1)*ln(1/2*c*x^(1/2)+1/2)+1/2*b^2*ln(c*x^(1/2)-1)+1/2*b^2*ln(1+c*x^(1/2))+1/8*b^2*ln(1+c*x^(1/2))^2-1/4*b^2*l
n(-1/2*c*x^(1/2)+1/2)*ln(1+c*x^(1/2))+1/4*b^2*ln(-1/2*c*x^(1/2)+1/2)*ln(1/2*c*x^(1/2)+1/2)+a*b*c^2*x*arctanh(c
*x^(1/2))+a*b*c*x^(1/2)+1/2*a*b*ln(c*x^(1/2)-1)-1/2*a*b*ln(1+c*x^(1/2)))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 175 vs. \(2 (75) = 150\).
time = 0.26, size = 175, normalized size = 2.06 \begin {gather*} {\left (c {\left (\frac {2 \, \sqrt {x}}{c^{2}} - \frac {\log \left (c \sqrt {x} + 1\right )}{c^{3}} + \frac {\log \left (c \sqrt {x} - 1\right )}{c^{3}}\right )} + 2 \, x \operatorname {artanh}\left (c \sqrt {x}\right )\right )} a b + \frac {1}{4} \, {\left (4 \, c {\left (\frac {2 \, \sqrt {x}}{c^{2}} - \frac {\log \left (c \sqrt {x} + 1\right )}{c^{3}} + \frac {\log \left (c \sqrt {x} - 1\right )}{c^{3}}\right )} \operatorname {artanh}\left (c \sqrt {x}\right ) + 4 \, x \operatorname {artanh}\left (c \sqrt {x}\right )^{2} - \frac {2 \, {\left (\log \left (c \sqrt {x} - 1\right ) - 2\right )} \log \left (c \sqrt {x} + 1\right ) - \log \left (c \sqrt {x} + 1\right )^{2} - \log \left (c \sqrt {x} - 1\right )^{2} - 4 \, \log \left (c \sqrt {x} - 1\right )}{c^{2}}\right )} b^{2} + a^{2} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x^(1/2)))^2,x, algorithm="maxima")

[Out]

(c*(2*sqrt(x)/c^2 - log(c*sqrt(x) + 1)/c^3 + log(c*sqrt(x) - 1)/c^3) + 2*x*arctanh(c*sqrt(x)))*a*b + 1/4*(4*c*
(2*sqrt(x)/c^2 - log(c*sqrt(x) + 1)/c^3 + log(c*sqrt(x) - 1)/c^3)*arctanh(c*sqrt(x)) + 4*x*arctanh(c*sqrt(x))^
2 - (2*(log(c*sqrt(x) - 1) - 2)*log(c*sqrt(x) + 1) - log(c*sqrt(x) + 1)^2 - log(c*sqrt(x) - 1)^2 - 4*log(c*sqr
t(x) - 1))/c^2)*b^2 + a^2*x

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 165 vs. \(2 (75) = 150\).
time = 0.36, size = 165, normalized size = 1.94 \begin {gather*} \frac {4 \, a^{2} c^{2} x + 8 \, a b c \sqrt {x} + {\left (b^{2} c^{2} x - b^{2}\right )} \log \left (-\frac {c^{2} x + 2 \, c \sqrt {x} + 1}{c^{2} x - 1}\right )^{2} + 4 \, {\left (a b c^{2} - a b + b^{2}\right )} \log \left (c \sqrt {x} + 1\right ) - 4 \, {\left (a b c^{2} - a b - b^{2}\right )} \log \left (c \sqrt {x} - 1\right ) + 4 \, {\left (a b c^{2} x - a b c^{2} + b^{2} c \sqrt {x}\right )} \log \left (-\frac {c^{2} x + 2 \, c \sqrt {x} + 1}{c^{2} x - 1}\right )}{4 \, c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x^(1/2)))^2,x, algorithm="fricas")

[Out]

1/4*(4*a^2*c^2*x + 8*a*b*c*sqrt(x) + (b^2*c^2*x - b^2)*log(-(c^2*x + 2*c*sqrt(x) + 1)/(c^2*x - 1))^2 + 4*(a*b*
c^2 - a*b + b^2)*log(c*sqrt(x) + 1) - 4*(a*b*c^2 - a*b - b^2)*log(c*sqrt(x) - 1) + 4*(a*b*c^2*x - a*b*c^2 + b^
2*c*sqrt(x))*log(-(c^2*x + 2*c*sqrt(x) + 1)/(c^2*x - 1)))/c^2

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \operatorname {atanh}{\left (c \sqrt {x} \right )}\right )^{2}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c*x**(1/2)))**2,x)

[Out]

Integral((a + b*atanh(c*sqrt(x)))**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x^(1/2)))^2,x, algorithm="giac")

[Out]

integrate((b*arctanh(c*sqrt(x)) + a)^2, x)

________________________________________________________________________________________

Mupad [B]
time = 1.06, size = 94, normalized size = 1.11 \begin {gather*} a^2\,x+\frac {c\,\left (2\,b^2\,\sqrt {x}\,\mathrm {atanh}\left (c\,\sqrt {x}\right )+2\,a\,b\,\sqrt {x}\right )-b^2\,{\mathrm {atanh}\left (c\,\sqrt {x}\right )}^2+b^2\,\ln \left (c^2\,x-1\right )-2\,a\,b\,\mathrm {atanh}\left (c\,\sqrt {x}\right )}{c^2}+b^2\,x\,{\mathrm {atanh}\left (c\,\sqrt {x}\right )}^2+2\,a\,b\,x\,\mathrm {atanh}\left (c\,\sqrt {x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x^(1/2)))^2,x)

[Out]

a^2*x + (c*(2*b^2*x^(1/2)*atanh(c*x^(1/2)) + 2*a*b*x^(1/2)) - b^2*atanh(c*x^(1/2))^2 + b^2*log(c^2*x - 1) - 2*
a*b*atanh(c*x^(1/2)))/c^2 + b^2*x*atanh(c*x^(1/2))^2 + 2*a*b*x*atanh(c*x^(1/2))

________________________________________________________________________________________